//
//  NSString+ChangePPPPP.m
//  diaoyuren
//
//  Created by Cheng on 16/1/26.
//  Copyright © 2016年 game. All rights reserved.
//

#import "NSString+ChangePPPPP.h"

@implementation NSString (ChangePPPPP)
+(NSString *)ChangePPPP:(NSString *)text{

    NSArray *ary = @[@"</p>",@"</h1>",@"</h2>",@"</h3>",@"</h4>",@"</h5>",@"</strong>"];
    
    
    for (int i =0; i<ary.count; i++) {
        NSError* error = NULL;
        
        NSRegularExpression* regex = [NSRegularExpression regularExpressionWithPattern:ary[i]
                                                                               options:0
                                                                                 error:&error];
        
        
        text = [regex stringByReplacingMatchesInString:text
                                                 options:0
                                                   range:NSMakeRange(0, text.length)
                                            withTemplate:@"</chengge>"];
        
        
    }
    
    return text;
}



@end
